package play.modules.m4fcity;

import com.google.gson.JsonObject;

public class OrganizationCity {
	private static final String ID_JSON = "id";
	private static final String CIF_JSON = "cif";
	private static final String NAME_JSON = "name";
	private static final String DOMAIN_JSON = "domain";
	
	private Long id;
	
	private String cif;
	
	private String name;

	private String domain;
	
	public OrganizationCity() {}
	
	public OrganizationCity(Long id, String cif, String name, String domain) {
		this.id = id;
		this.cif = cif;
		this.name = name;
		this.domain = domain;
	}
	
	public OrganizationCity(JsonObject data) {
		Long id = data.get(ID_JSON).getAsLong();
		String cif = data.get(CIF_JSON).getAsString();
		String name = data.get(NAME_JSON).getAsString();
		String domain = data.get(DOMAIN_JSON).getAsString();
		
		this.id = id;
		this.cif = cif;
		this.name = name;
		this.domain = domain;
	}
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCif() {
		return cif;
	}

	public void setCif(String cif) {
		this.cif = cif;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}
}
